main(a,b,i,j,x,c,n)
{
	for(;~scanf("%d%d",&a,&b);printf("%d %d %d\n",a,b,x))
	{
		for(x=0,i=a<b?a:b,j=a>b?a:b;i<=j;i++,x=x>c?x:c)
			for(c=1,n=i;n!=1;n=n&1?3*n+1:n/2,c++);
	}
}
